# Maintainer: Levente Polyak <levente[at]leventepolyak[dot]net>
# Contributor: Fabiano Furtado < fusca14 (at) gmail (dot) com >

pkgname=wifite
pkgver=2.7.0
pkgrel=1
epoch=2
pkgdesc='Tool to attack multiple WEP and WPA encrypted networks at the same time'
url='https://github.com/kimocoder/wifite2'
arch=('any')
license=('GPL2')
depends=('python' 'python-chardet' 'aircrack-ng' 'iproute2' 'iw')
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
optdepends=(
  'wireshark-cli: detecting WPS networks and inspecting handshake capture files'
  'reaver: WPS Pixie-Dust & brute-force attacks'
  'bully: WPS Pixie-Dust & brute-force attacks'
  'cowpatty: detect WPA handshakes'
  'pyrit: detect WPA handshakes'
  'macchanger: change MAC for attacks'
  'hashcat: cracking PMKID hashes'
  'hcxdumptool: capturing PMKID hashes'
  'hcxtools: converting PMKID packet captures into hashcat format'
  'john: For CPU (OpenCL)/GPU cracking passwords fast'
)
provides=(wifite2)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('ca871aae14b6eb6d66fc37c2ec3b25a4227cb197cf1174c9c77ce36100818362cb31fb371649736d566d8742ffdf1091c4770db8a3f61c7b9f826bcb6dcc1513')
b2sums=('ae8d91bee769ac96f32309d93ab182b635de7730e1d8a3b51226e8b750c390e77abe14008e957bce4c8240362ae76e361fa6d343f79cbdaeac302da4b305c715')

prepare() {
  cd ${pkgname}2-${pkgver}
  sed 's|sbin|bin|g' -i setup.cfg
}

build() {
  cd ${pkgname}2-${pkgver}
  python -m build --wheel --no-isolation
}

package() {
  cd ${pkgname}2-${pkgver}
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
